New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mailgun-js

Package Overview
Dependencies
Maintainers
1
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mailgun-js

Simple Node.js helper module for Mailgun API

  • 0.13.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
141K
increased by8.49%
Maintainers
1
Weekly downloads
 
Created

What is mailgun-js?

The mailgun-js npm package is a client library for interacting with the Mailgun API, which is a service for sending, receiving, and tracking emails. This package allows developers to easily integrate Mailgun's email services into their Node.js applications.

What are mailgun-js's main functionalities?

Send Email

This feature allows you to send an email using the Mailgun service. You need to provide your API key and domain, and then specify the email details such as the sender, recipient, subject, and body.

const mailgun = require('mailgun-js')({ apiKey: 'YOUR_API_KEY', domain: 'YOUR_DOMAIN_NAME' });
const data = {
  from: 'Excited User <me@samples.mailgun.org>',
  to: 'bar@example.com, YOU@YOUR_DOMAIN_NAME',
  subject: 'Hello',
  text: 'Testing some Mailgun awesomeness!'
};
mailgun.messages().send(data, function (error, body) {
  console.log(body);
});

Validate Email Address

This feature allows you to validate an email address to check if it is in the correct format and exists. This can be useful for ensuring that user-provided email addresses are valid.

const mailgun = require('mailgun-js')({ apiKey: 'YOUR_API_KEY', domain: 'YOUR_DOMAIN_NAME' });
mailgun.validate('email@example.com', function (error, body) {
  console.log(body);
});

List Mailing Lists

This feature allows you to list all the mailing lists associated with your Mailgun account. Mailing lists can be used to manage groups of email addresses for bulk emailing.

const mailgun = require('mailgun-js')({ apiKey: 'YOUR_API_KEY', domain: 'YOUR_DOMAIN_NAME' });
mailgun.lists().list(function (error, body) {
  console.log(body);
});

Other packages similar to mailgun-js

Keywords

FAQs

Package last updated on 14 Aug 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc